@extends('shop::layouts.master')
@section('title')
    角色列表
@endsection
@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
{{--                    <div class="layui-card-body ">--}}
{{--                        <form class="layui-form layui-col-space5">--}}
{{--                      --}}{{--      <div class="layui-input-inline layui-show-xs-block">--}}
{{--                                <input type="text" name="name" placeholder="技师姓名" value="{{$search['name']}}" autocomplete="off" class="layui-input">--}}
{{--                            </div>--}}
{{--                            <div class="layui-input-inline layui-show-xs-block">--}}
{{--                             --}}{{--   <button class="layui-btn" lay-submit="" lay-filter="sreach">--}}
{{--                                    <i class="layui-icon">&#xe615;</i>--}}
{{--                                </button>--}}

{{--                            </div>--}}
{{--                        </form>--}}
{{--                    </div>--}}
                    <div class="layui-card-body">

                        <button class="layui-btn" onclick="xadmin.open('添加','{{route('shop_role_create')}}')">
                            <i class="layui-icon"></i>添加
                        </button>
                        <button class="layui-btn" onclick="location.reload()">
                            <i class="layui-icon layui-icon-refresh"></i>
                        </button>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>角色名称</th>
                                <th>角色别名</th>
                                <th>角色描述</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                                <tr>
                                    <td>{{$key+1}}</td>
                                    <td>{{$value['name']}}</td>
                                    <td>{{$value['display_name']}}</td>
                                    <td>{{$value['description']}}</td>
                                    <td>{{$value['created_at']}}</td>
                                    <td class="td-manage">
                                        <button class="layui-btn layui-btn layui-btn-xs"  onclick="xadmin.open('修改角色','{{route("shop_role_edit",["id"=>$value["id"]])}}')" ><i class="layui-icon">&#xe642;</i>修改</button>
                                        <button class="layui-btn-danger layui-btn layui-btn-xs ajax_member_del" data-href="{{route('shop_role_del',['id'=>$value['id']])}}" data-title="确定删除角色吗？请谨慎操作" href="javascript:;" ><i class="layui-icon">&#xe640;</i>删除</button>

                                    </td>
                                </tr>

                            @endforeach
                            @if(count($data) == 0)
                                <tr>
                                    <td colspan="66" style="text-align: center">暂无数据</td>
                                </tr>
                            @endif
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection

@section('tab_js')

@endsection




